-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ItemStack#effectiveName #11469
base: master
Are you sure you want to change the base?
Add ItemStack#effectiveName #11469
Conversation
Duplicate of #9050 |
Rebased on 1.21.3 |
Something else that was brought up internally is the whole "display name" naming being outdated/confusing in general now. effectiveName is good for the new method on ItemStack, but we'd like this to go alongside improving ItemStack#displayName docs and replacing ItemMeta displayName methods with customName (since that's what it returns, but other data components can change or be the effective display name). Replace in this case means marking the old as obsolete and linking to the new |
Can I move the ItemStack#displayName from the adventure patch to my patch? It ends up a bit uglier without that |
Yeah sure |
Applied the deprecation and made the replacement for ItemStack#displayName |
Adds a new method which returns the name of an itemstack which the player sees in their inventory. Takes into account any data components exactly as vanilla.
Unlike ItemStack#displayName, does not add additional brackets etc